//
//  NSString+Category.h
//  KeleAppProject
//
//  Created by Cen Zhou on 2018/1/10.
//  Copyright © 2018年 Cen Zhou. All rights reserved.
//

#import <Foundation/Foundation.h>

@interface NSString (Category)
+ (NSString *)replaceStringWithAsterisk:(NSString *)originalStr startLocation:(NSInteger)startLocation lenght:(NSInteger)lenght;
/**
 *  判断是否是纯汉字
 */
- (BOOL)isChinese;
- (BOOL)hasSpecialcharacter;
// 千位符转换
+ (NSString *)separatedDigitStringWithStr:(NSString *)digitString;

//检测是否为纯数字
+ (BOOL)isPureInt:(NSString *)string;

// 计算尺寸
- (CGSize)sizeWithFont:(NSUInteger)font maxSize:(CGSize)maxSize;

// MD5加密
- (NSString *)MD5Encode;

// 正则匹配手机号
- (BOOL)checkTelNumber;

//验证登录密码
- (BOOL)checkPsw;

//字母和数字 8-16位
- (BOOL)checkPassWord;

// 正则匹配用户身份证号
- (BOOL)checkUserIdCard;

// 匹配银行卡
- (BOOL)checkBankCard;

// 判断是否包含表情符号
- (BOOL)isIncludingEmoji;

// 移除表情符号
- (instancetype)removedEmojiString;

// 转json
+ (NSString *)convertToJsonData:(id)sender;

//判断是否含有汉字
- (BOOL)includeChinese;
+ (BOOL)isVaildRealName:(NSString *)realName;


/**
 *  将NSData按base64转成字符串
 */
+ (NSString *)dataTransToStringWithBase64:(NSData *)data;

//邮箱校验
- (BOOL)validateEmail;

// 获取内存大小
+ (NSString *)getMermorySize;

// 获取ip地址
+ (NSString *)getIpAddresses;

+ (NSString *)getDeviceName;

@end
